Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Headers support for OpenApi and Postman parsers #10

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

nikspyratos
Copy link

Based on your guidance in #9 I poked around with getting headers working for the OpenApiParser. After a little more digging and using a postman collection for the same API I'm building for, I added header parsing to the Postman parser too.

While I see named parameters are in use here, juuuust to be safe I've added the header parameter arrays to the end of the argument list instead of anywhere else.

Let me know what you think, or if you have any issues with any API specs/collections you have?

@HelgeSverre
Copy link
Member

This seems to also generate arguments for common headers that Saloon already handles:

Authorization
Content-Type
Accept

I'd like to see a blacklist of headers Saloon already handles before merging this :)

See:

@nikspyratos
Copy link
Author

I haven't forgotten about this, just life's a bit busy right now 😅

@HelgeSverre
Copy link
Member

No worries :)

@nikspyratos
Copy link
Author

Heyo @HelgeSverre I've added some basic exclusion to the parsers, let me know what you think or if you'd prefer some edits/style changes. Tried it out with the latest version of the openapi spec I initially mentioned and the Stripe postman collection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants